from enum import Enum


class OrderType(Enum):
    BUY = 0
    SELL = 1

    @classmethod
    def typeString(cls, status, key):
        maps = {
            cls.BUY: {
                'type': 'BUY',
                'zh': '买',
                'zh_alias': '做多'
            },
            cls.SELL: {
                'type': 'SELL',
                'zh': '卖',
                'zh_alias': '做空'
            }
        }
        return maps[status][key]
